// 轮播
function img(m){
	$('#imgList img').fadeOut(300).eq(m).fadeIn(300);
}

function icon(m){
	$('#iconList li').css('background', 'rgba(0,0,0,0.4)');
	$('#iconList li').eq(m).css({
		background: 'white',
	});
}

index = 0;
function run(){
	index++;

	if( index > 5){
		index = 0;
	}

	img(index);  
	icon(index); 
}
timer = setInterval(run , 5000);


$('#banner').mouseover(function(){
	clearInterval( timer );
});


$('#banner').mouseout(function(){
	timer = setInterval(run , 5000);
})



$('#iconList li').each(function(i, item){
	$('#iconList li').eq(i).mouseover(function(){
		img(i);
		icon(i);
		index = i;
	});
})